home *** CD-ROM | disk | FTP | other *** search
- /*
- * MapInfo.h - map structures
- */
-
- #ifndef _MapInfo_
-
- # define _MapInfo_
-
-
- # define maxPtSize 127 /* max legal point size within MacWrite */
-
-
- /*
- * Font chosen is specified by its number in FontMgr.h. If no font
- * is chosen, use anyFont.
- * Point size is one of 9, 10, 12, 14, 18 or 24, or none. If none,
- * use anySize.
- */
-
- # define anyFont (-1)
- # define anySize (-1)
-
-
- /*
- * Style word coded as follows: high bit never used in a legal MacWrite
- * style spec, so it's used to signify "no style chosen". If the high
- * bit is set, others can be anything, but are ignored. If it's clear
- * the others are set according to the style attributes selected. If
- * no attributes are selected (low 7 bits = 0), that means plain.
- *
- * Warning: these constants are specified for convience in coding,
- * but the values are really hardcoded, since they're sometimes used
- * in non-obvious ways. See StyleToStr for an example.
- */
-
- typedef enum /* bits used in style byte */
- {
- /* 0 = plain */
- styleBold = 1, /* boldface */
- styleItalic = 2, /* italic */
- styleUnder = 4, /* underline */
- styleOutline = 8, /* outline */
- styleShadow = 16, /* shadow */
- styleSuper = 32, /* superscript */
- styleSub = 64, /* subscript */
- anyStyle = 128 /* high bit unused in any legal style, so */
- /* it's used to signify no style chosen */
- };
-
-
- /*
- * A conversion format consists of a font, size and style
- * combination. It can be used in two ways, depending on its
- * function in a mapping.
- *
- * A mapping specification consists of an input conversion format (what
- * text characterists (font, size, style) to match) and an output format
- * (what to map the matched input spec onto). There is also a field
- * used during specification editing to indicate whether user
- * had selected the input or the output side of the mapping last.
- */
-
-
- typedef struct /* conversion format */
- {
- int font; /* anyFont if none selected */
- int size; /* anySize if none selected */
- int style; /* anyStyle if none selected, 0 if plain */
- /* else bits = attributes selected */
- } ConvSpec;
-
-
- typedef struct /* mapping specification */
- {
- ConvSpec inFmt; /* input format */
- ConvSpec outFmt; /* output format */
- Boolean isInput; /* whether input side active or not */
- } MapSpec;
-
-
- /*
- * Structures used for holding text representations of the conversion
- * and mapping specifications
- */
-
- typedef struct /* structure for holding text representation */
- { /* of mapping specification */
- Str255 markStr;
- Str255 fontStr;
- Str255 sizeStr;
- Str255 styleStr;
- } ConvStr;
-
-
- typedef struct
- {
- ConvStr inStr;
- ConvStr outStr;
- } MapStr;
-
- # endif
-